import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter)

//预定端
//import Home from './components/home'
import Hello from './components/Hello'
import Test from './components/test'
import Homepage from './components/homepage'

import Select from './components/select'
// homepagechild
import She from './components/she/she'
import Wo from './components/wo/wo'
import Quan from './components/quan/quan'

//房间操作
import Roominfo from './components/she/roominfo'
import Reservation from './components/she/reservation'
import Magnify from './components/she/magnify'
import payment from './components/pay/payment'
import PaymentSuccess from './components/pay/paymentSuccess'
import OrderDetail from './components/orderDetail'
import MyOrder from './components/wo/myOrder'
import BookInfo from './components/pay/bookInfo'

//留言中心
import MsgList from './components/she/msglist'

//我信息
import YdAbout from './components/wo/about'
import YdUserinfo from './components/wo/userinfo'
import YdMobile from './components/wo/mobileBind'
import Email from './components/wo/email'

import HousekeeperInfo from './components/she/housekeeperInfo'
//import Selectdate from './components/selectdate'

//管家端 host
import Host from './components/host/host'
import HostCalendar from './components/host/calendar/calendar'
import HostMyself from './components/host/my/myself'
import Hostroomlist from './components/host/room/roomlist'
import HostRoominfo from './components/host/room/hostroominfo'
import Management from './components/host/equipment/management'
import Check from './components/host/equipment/check'
import CalendarInfo from './components/host/calendar/calendarinfo'
import About from './components/host/my/about'
import Userinfo from './components/host/my/userinfo'
import HostOrderDetail from './components/host/order/hostOrderDetail'
import ForwardRoom from './components/host/room/forwardRoom'
//管家端无权限
import NoHostAuth from './components/common/NoHostAuth'


//404
import ErrorPage from './components/common/ErrorPage'

const routes = [{
        path: '/',
        component: Homepage, //主页
        children: [{
                path: '/test',
                component: Test
            },

            {
                path: '/hello',
                component: Hello
            },
            {
                path: '/', //舍
                component: She
            },
            {
                path: '/wo', //我
                component: Wo
            },
            {
                path: '/quan', //圈
                component: Quan
            },

        ]
    },
    {
        path: '/msglist', //选定的房间信息
        component: MsgList
    },
    {
        path: '/roominfo', //选定的房间信息
        component: Roominfo
    },
    {
        path: '/payment', //支付页面
        component: payment
    },
    {
        path: '/paymentSuccess', //支付成功
        component: PaymentSuccess
    },
    {
        path: '/bookInfo', //预定信息
        component: BookInfo
    },
    {
        path: '/orderDetail', //订单详情
        component: OrderDetail
    },
    {
        path: '/myOrder', //我的订单
        component: MyOrder
    },
    {
        path: '/ydabout', //个人信息
        component: YdAbout
    },
    {
        path: '/yduserinfo', //关于我们
        component: YdUserinfo
    },
    {
        path: '/mobileBind', //绑定手机
        component: YdMobile
    },
    {
        path: '/email', //信箱
        component: Email
    },
    {
        path: '/magnify', //
        component: Magnify
    },
    {
        path: '/housekeeperInfo', //
        component: HousekeeperInfo
    },
    {
        path: '/reservation', //预定房间
        component: Reservation
    },
    {
        path: '/select', //选定的房间信息
        component: Select
    },
    {
        path: '/host', //管家端
        component: Host,
        children: [{
                path: '/', //管家日历
                component: HostCalendar
            },
            {
                path: '/forwardRoom', //远期房态
                component: ForwardRoom
            },
            {
                path: '/hostmyself', //管家信息
                component: HostMyself
            }

        ]
    },
    {
        path: '/hostroominfo', //管家端房间信息
        component: HostRoominfo
    },
    {
        path: '/hostOrderDetail', //管家端房间信息
        component: HostOrderDetail
    },
    {
        path: '/forwardRoom', //管家端远期房态
        component: ForwardRoom
    },
    {
        path: '/hostroomlist', //管家房间列表
        component: Hostroomlist
    },
    {
        path: '/management', //设备管理
        component: Management
    },
    {
        path: '/check', //房屋点检
        component: Check
    },
    {
        path: '/calendarinfo', //管家日历状态订单列表
        component: CalendarInfo
    },
    {
        path: '/about', //管家关于我们
        component: About
    },
    {
        path: '/userinfo', //管家个人信息
        component: Userinfo
    },
    {
        path: '/noHostAuth', //404页面
        component: NoHostAuth
    },
    {
        path: '/ErrorPage', //404页面
        component: ErrorPage
    },
    // {
    //     path: '/selectdate', //选定的房间信息
    //     component: Selectdate
    // },
    {
        path: '*',
        redirect: '/'
    }
]
const router = new VueRouter({
    mode: 'hash',
    routes: routes, // short for routes: routes
    linkActiveClass: 'active', //router-link的选中状态的class，也有一个默认的值
    history: true,
    canReuse: false,
});
export default router